package com.ccrfid.rmc6.service.business.prison.patrolcheck;

import com.ccrfid.rmc6.appconfig.exception.pojo.AppException;
import com.ccrfid.rmc6.entity.business.prison.patrolcheck.*;
import com.ccrfid.rmc6.pojo.dto.prison.patrolcheck.PatrolCheckDataDto;
import com.ccrfid.rmc6.pojo.dto.prison.patrolcheck.PatrolCheckGroupDto;
import com.ccrfid.rmc6.pojo.dto.prison.patrolcheck.PatrolCheckResultDetailDto;
import com.ccrfid.rmc6.pojo.dto.prison.patrolcheck.PatrolCheckResultDto;
import com.ccrfid.rmc6.repository.search.SearchCriteria;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

import java.sql.Time;
import java.util.List;

public interface PatrolCheckService {

    //获取巡更任务计划时间列表
    List<PatrolCheckPlanTimeEntity> getPatrolCheckPlanTimeList();

    //新增巡更任务计划时间信息
    PatrolCheckPlanTimeEntity createPatrolCheckPlanTime(Time timeValue);

    //删除巡更任务计划时间信息
    Boolean deletePatrolCheckPlanTime(Time timeValue);

    //获取全部巡更组
    List<PatrolCheckGroupEntity> getAllPatrolCheckGroups();

    //获取某个巡更组
    PatrolCheckGroupEntity getPatrolCheckGroup(Long groupId);

    //新增某个巡更组
    PatrolCheckGroupEntity createPatrolCheckGroup(PatrolCheckGroupEntity entity) throws AppException;

    //修改某个巡更组
    PatrolCheckGroupEntity updatePatrolCheckGroup(Long groupId, PatrolCheckGroupEntity entity) throws AppException;

    //删除某个巡更组
    Boolean deletePatrolCheckGroup(Long groupId);

    //获取某个巡更组包含的巡更点信息
    List<PatrolCheckPointView> getPatrolCheckPointList(SearchCriteria criteria, Sort sort);

    //为某个巡更组增加一个巡更点
    PatrolCheckPointEntity createPatrolCheckPoint(Long groupId, PatrolCheckPointEntity entity) throws AppException;

    //修改某个巡更点信息
    PatrolCheckPointEntity updatePatrolCheckPoint(Long groupId, Long checkPointId, PatrolCheckPointEntity entity) throws AppException;

    //删除某个巡更点信息
    Boolean deletePatrolCheckPoint(Long groupId, Long checkPointId);

    //删除某个巡更组下的批量巡更点
    Boolean deletePatrolCheckPoints(Long groupId, List<Long> checkPointIdList);

    //分页获取巡更统计结果
    Page<PatrolCheckResultEntity> getPatrolCheckResult(SearchCriteria criteria, Pageable pageable);

    //分页获取某个巡更统计详细信息
    Page<PatrolCheckResultDetailEntity> getPatrolCheckResultDetails(SearchCriteria criteria, Pageable pageable);

    //获取手持机巡更所需的巡更组-巡更点配置信息
    List<PatrolCheckGroupDto> getPatrolCheckGroupConfig();

    //手持机提交巡更结果
    void updatePatrolCheckResultList(List<PatrolCheckResultDto> resultList);

    //获取某个巡更结果轨迹
    List<PatrolCheckResultDetailDto> getPatrolCheckResultPathLine(Long checkResultId);

    //添加/修改巡更点位置
    PatrolCheckPointView createPatrolCheckPointPosition(Long pointId, PatrolCheckPointPositionEntity positionEntity)
            throws AppException;

    //删除巡更点位置
    Boolean deletePatrolCheckPointPosition(Long pointId) throws AppException;
}
